<p>
  Write a program that transposes a matrix of 32-bit floating point numbers on a GPU. The
  transpose of a matrix switches its rows and columns. Given a matrix \(A\) of dimensions \(rows \times cols\), the transpose \(A^T\) will have dimensions \(cols \times rows\). All matrices are stored in row-major format.
</p>

<h2>Implementation Requirements</h2>
<ul>
  <li>Use only native features (external libraries are not permitted)</li>
  <li>The <code>solve</code> function signature must remain unchanged</li>
  <li>The final result must be stored in the matrix <code>output</code></li>
</ul>

<h2>Example 1:</h2>
<p>Input: 2×3 matrix</p>
\[
\begin{bmatrix}
1.0 & 2.0 & 3.0 \\
4.0 & 5.0 & 6.0
\end{bmatrix}
\]

<p>Output: 3×2 matrix</p>
\[
\begin{bmatrix}
1.0 & 4.0 \\
2.0 & 5.0 \\
3.0 & 6.0
\end{bmatrix}
\]

<h2>Example 2:</h2>
<p>Input: 3×1 matrix</p>
\[
\begin{bmatrix}
1.0 \\
2.0 \\
3.0
\end{bmatrix}
\]

<p>Output: 1×3 matrix</p>
\[
\begin{bmatrix}
1.0 & 2.0 & 3.0
\end{bmatrix}
\]

<h2>Constraints</h2>
<ul>
  <li>1 ≤ <code>rows</code>, <code>cols</code> ≤ 8192</li>
  <li>Input matrix dimensions: <code>rows</code> × <code>cols</code></li>
  <li>Output matrix dimensions: <code>cols</code> × <code>rows</code></li>
</ul> 